package com.five.community.mapper;

import com.five.community.bean.Pet;
import com.five.community.bean.vo.PetVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PetMapper {
    //查询所有数据
    List<Pet> selectAll() throws Exception;
    //根据id查询所有宠物数据
    Pet selectById(long id) throws Exception;
    //查询所有宠物及主人
    List<PetVo> selectAllPet() throws Exception;

    void insert(Pet pet) throws Exception;

    void delete(long id) throws Exception;

    List<PetVo> selectByName(String name) throws Exception;

    void update(Pet pet) throws Exception;
}
